<template>
  <markdown ref="markdown"/>
</template>

<script>

import {getFileContent} from "@/util";

export default {
  name: "MarkdownPreview",
  data() {
    return {}
  },
  mounted() {
    let filePath = this.$route.query.filePath;
    getFileContent(filePath).then(res => {
      this.$refs.markdown.setContent(res.data)
    })
  }
}
</script>

<style scoped>

</style>
